onSuccessSuspend

inline suspend fun <T> Result<T>.onSuccessSuspend(crossinline action: suspend (value: T) -> Unit): Result<T>

Executes a suspend function action if the current result is a success.

Return

The current Result instance.

Parameters

action

A suspend function to be executed if the result is a success.